//异步
setImmediate(() => {
    console.log('setImmediate');
});

setTimeout(() => {
    console.log('timeout');
}, 0);

//把事件放在当前事件队列的队尾
process.nextTick(() => {
    console.log('nextTick');
});